package com.zh.filetransport.indicator;

import com.zh.filetransport.indicator.impl.ConsoleProgressIndicator
import com.zh.filetransport.indicator.impl.DataProgressIndicator
import com.zh.filetransport.model.Mode

object ProgressIndicatorFactory {
    fun create(mode: String): ProgressIndicator {
        return if (Mode.Console.name.equals(mode, ignoreCase = true)) {
            ConsoleProgressIndicator()
        } else {
            DataProgressIndicator()
        }
    }
}